package com.zs.toolbox.web2j.system.core.constant;

/**
 * @author shuai.zhang  on 2018/9/26
 * @description
 */
public enum WtEVcodePurpose {
    VCODE_PURPOSE_REGISTER(1, "注册"),
    VCODE_PURPOSE_LOGIN(2, "登陆"),
    VCODE_PURPOSE_FINDPASSWORD(3, "找回密码");

    Integer code;
    String message;

    public static WtEVcodePurpose valueOfCode(Integer code) {
        switch (code) {
            case 1:
                return VCODE_PURPOSE_REGISTER;
            case 2:
                return VCODE_PURPOSE_LOGIN;
            case 3:
                return VCODE_PURPOSE_FINDPASSWORD;
            default:
                return null;
        }
    }

    WtEVcodePurpose(int value, String message) {
        this.code = value;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public WtEVcodePurpose setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public WtEVcodePurpose setMessage(String message) {
        this.message = message;
        return this;
    }
}
